//go:build wireinject
// +build wireinject

package tool

import (
	"back/conf/global"
	"back/router/middle"
	"back/router/router/nail"
	"back/router/router/ro_tool"
	srv "back/service/model"
	"back/service/tool"
	"github.com/gin-gonic/gin"
	"github.com/google/wire"
	"utilx/rox"
)

func initRouter() rox.IRouters {
	panic(wire.Build(
		ro_tool.Provider,
		tool.Provider,
	))
}

func InitToolRouter(group *gin.RouterGroup) {
	groupx := group.Group("/tools")
	rox.InitRouter(groupx, initRouter()...)
}

func initNail() rox.IRouters {
	panic(wire.Build(
		nail.Provider,
		srv.Provider,
		global.Provider,
	))
}

func InitNailRouter(group *gin.RouterGroup) {
	group.Use(middle.Resp())
	group.Use(middle.Gzip())
	rox.InitRouter(group, initNail()...)
}

// wire gen wire.go
//D:\Softwares\Runtime\go\bin\wire gen wire.gp
